﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class NNC_H_GiangHang : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        gvDanhSachNCC_GiangHang.Columns[0].HeaderText = "Hình";
        ((ImageField)gvDanhSachNCC_GiangHang.Columns[0]).DataImageUrlField = "Hinh";
        ((ImageField)gvDanhSachNCC_GiangHang.Columns[0]).DataImageUrlFormatString = "~/NCC/Images_/GiangHang/{0}";
        ((ImageField)gvDanhSachNCC_GiangHang.Columns[0]).ControlStyle.Height = 150;
        ((ImageField)gvDanhSachNCC_GiangHang.Columns[0]).ControlStyle.Width = 150;


        gvDanhSachNCC_GiangHang.Columns[2].HeaderText = "Tên nhà cung cấp";
        ((BoundField)gvDanhSachNCC_GiangHang.Columns[2]).DataField = "NCC_UN";


        gvDanhSachNCC_GiangHang.Columns[3].HeaderText = "Tên Sản phẩm";
        ((BoundField)gvDanhSachNCC_GiangHang.Columns[3]).DataField = "Ten";

        gvDanhSachNCC_GiangHang.Columns[4].HeaderText = "Tên chủng loại sản phảm";
        ((BoundField)gvDanhSachNCC_GiangHang.Columns[4]).DataField = "TenCLSP";

        gvDanhSachNCC_GiangHang.Columns[5].HeaderText = "Mô tả";
        ((BoundField)gvDanhSachNCC_GiangHang.Columns[5]).DataField = "MoTa";

        gvDanhSachNCC_GiangHang.Columns[6].HeaderText = "Số lượng Tối thiểu";
        ((BoundField)gvDanhSachNCC_GiangHang.Columns[6]).DataField = "SLToiThieu";

        gvDanhSachNCC_GiangHang.Columns[7].HeaderText = "Ngày cập nhật sau cùng";
        ((BoundField)gvDanhSachNCC_GiangHang.Columns[7]).DataField = "NgayCapNhatSauCung";

        gvDanhSachNCC_GiangHang.DataSource = DataAccess_Layer.NCC_GiangHang_DAC.layDanhSach();
        gvDanhSachNCC_GiangHang.DataBind();
    }
}